import http from "@/utils/http";

// 分页查询仓库列表
export function log_searchTabList(params) {
  return http.post("/sys-logistics-service-item/select/Page", params);
}
// 新增物流商保存
export function pro_saveInfo(params) {
  return http.post("/sys-logistics-service-item/save/info", params);
}
// 新增物流平台保存
export function plat_savePlatInfo(params) {
  return http.post("/sys-logistics/save/info", params);
}
// 新增物流服务
export function pro_saveSerinfo(params) {
  return http.post("/sys-logistics-service-way/save/info", params);
}
// 添加物流商的物流服务方式
export function pro_saveSerWay(params) {
  return http.post("/sys-logistics-service-item-way/save", params);
}
// 分页查询物流服务
export function service_List(params) {
  return http.post("/sys-logistics-service-way/select/Page/List", params);
}
// 查询物流商未添加的服务方式
export function pro_searchItemList(serviceId) {
  return http.post("/sys-logistics-service-item-way/save/not/" + serviceId);
}
// 查询未添加的服务商
export function pro_searchNotSerce(sysLogisticsId) {
  return http.post("/sys-logistics-service-item-fk/notadd/" + sysLogisticsId);
}
// 添加服务商
export function plat_addSerList(sysLogisticsId, params) {
  return http.post(
    "/sys-logistics-service-item-fk/save/add/" + sysLogisticsId,
    params
  );
}
// 修改物流商保存
export function pro_editInfo(serviceId, params) {
  return http.post(
    "/sys-logistics-service-item/edit/info/" + serviceId,
    params
  );
}
// 修改物平台
export function plat_editInfo(sysLogisticsId, revision, params) {
  return http.post(
    "/sys-logistics/edit/info/" + sysLogisticsId + "/" + revision,
    params
  );
}
// 修改物流平台状态
export function plat_editplatDisable(sysLogisticsId, revision, disable) {
  return http.post(
    "/sys-logistics/edit/disable/" +
      sysLogisticsId +
      "/" +
      revision +
      "/" +
      disable
  );
}
// 即时修改物流平台服务商服务启用状态
export function plat_editSerInfo(
  serviceItemId,
  serviceItemWayId,
  revision,
  params
) {
  return http.post(
    "/sys-logistics-service-way-tenant/enable/" +
      serviceItemId +
      "/" +
      serviceItemWayId +
      "/" +
      revision,
    params
  );
}
// 修改服务商启用状态
export function pro_editSerDisable(
  sysLogisticsId,
  serviceItemTenantId,
  revision,
  params
) {
  return http.post(
    "/sys-logistics-service-item-tenant/enable/" +
      sysLogisticsId +
      "/" +
      serviceItemTenantId +
      "/" +
      revision,
    params
  );
}
//根据平台查询物流商
export function plat_searchPlatSer(sysLogisticsId, params) {
  return http.post(
    "/sys-logistics-service-item-fk/select/all/" + sysLogisticsId,
    params
  );
}
// 修改物流服务保存
export function pro_editSerInfo(serviceId, serviceWayId, params) {
  return http.post(
    "/sys-logistics-service-item-way/editDisable/" +
      serviceId +
      "/" +
      serviceWayId,
    params
  );
}
// 查询单条物流商
export function pro_searchOneInfo(serviceItemId) {
  return http.post("/sys-logistics-service-item/select/One/" + serviceItemId);
}
// 查询单条物流平台
export function plat_searchOne(sysLogisticsId) {
  return http.post("/sys-logistics/select/One/" + sysLogisticsId);
}
//获取物流平台树的接口
export function sysTeam_tree(params) {
  return http.post("/sys-logistics/select/tree", params);
}

//自定义报价：

//查询自定义报价列表
export function cus_searchTabList(serviceWayId, params) {
  return http.post(
    "/sys-logistics-service-way-quotation/select/page/" + serviceWayId,
    params
  );
}

//添加或修改自定义规则数据
export function cus_addOrEditGui(serviceWayId, params) {
  return http.post(
    "/sys-logistics-service-way-quotation/tableList/" + serviceWayId,
    params
  );
}
//删除自定义规则数据
export function cus_deleteGui(serviceWayId, quotationId) {
  return http.post(
    "/sys-logistics-service-way-quotation/remove/" +
      serviceWayId +
      "/" +
      quotationId
  );
}
//验证服务方式名称是否存在
export function isSername(params) {
  return http.post("/sys-logistics-service-way/select/wayName", params);
}
